<div id="page-heading"><h1><?php echo lang('groups.caption')?></h1></div>
<?php $this->load->view('partials/notices'); ?>
<?php if ($groups): ?>
<?php echo form_open('admin/folders/action', 'id="mainform"');?>
<table cellspacing="0" cellpadding="0" border="0" width="100%" id="product-table">
				<tbody>
				<tr>
					<th class="table-header-repeat line-left"><a href="javascript:void(0);"><?php echo lang('groups.name');?></a></th>
					<th class="table-header-repeat line-left"><a href="javascript:void(0);"><?php echo lang('groups.short_name');?></a></th>
				<?php if (group_has_role('files', 'delete_folder')): ?>
					<th class="table-header-repeat line-left"><a href="javascript:void(0);"><?php echo lang('global:actions')?></a></th>
				<?php endif; ?>
				</tr>
				<?php foreach ($groups as $key => $group):?>
				<tr <?php if($key%2 == 0):?>class="alternate-row"<?php endif;?>>
					<td><?php echo $group->description; ?></td>
					<td><?php echo $group->name; ?></td>
					<td class="options-width">
					<?php echo anchor('admin/users/edit_group/'.$group->id, ' ', 'title="'. lang('buttons.edit').'" class="icon-1 info-tooltip"'); ?>
					<?php if ( ! in_array($group->name, array('user', 'admin'))): ?>
						<a class="icon-2 info-tooltip" title="<?php echo lang('buttons.delete');?>" href="javascript:void(0);" onclick="if(confirm('<?php echo lang('global:delete')?>')){window.location.href='<?php echo site_url('admin/users/delete_group/'.$group->id);?>'}"></a>
					<?php endif; ?>
					<?php echo anchor('admin/users/permissions_group/'.$group->id, ' ', 'title="'. lang('permissions.edit').'" class="icon-3 info-tooltip"'); ?>
					</td>
				</tr>
				<?php endforeach;?>
				</tbody>
</table>
<?php echo form_close();?>

<?php else: ?>
	<div class="no_data file-folders">
		<p><?php echo lang('groups.no_groups');?></p>
	</div>
<?php endif; ?>